package com.kamistoat.meimeimall.meimeimallorder.dao;

import com.kamistoat.meimeimall.meimeimallorder.entity.SubOrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 未经拆分的总订单
 * 
 * @author kamistoat
 * @email linjianshanke@163.com
 * @date 2021-09-12 16:42:29
 */
@Mapper
public interface SubOrderDao {
    /**
     * 根据总订单SN查询拆分的子订单SN
     * @param orderSn
     * @return
     */
    List<SubOrderEntity> selectAllRelationByOrderSn(@Param("orderSn") String orderSn);


    Long insert(@Param("entity") SubOrderEntity subOrderEntity);

    List<Long> insertBatch(@Param("entityList") List<SubOrderEntity> subOrderEntities);

    Long logicDeleteByOrderSn(@Param("orderSn") String subOrderSn);
}
